<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>小说搜索</title>
    <link rel="stylesheet" href="./css/search.css">
    <script src="http://code.jquery.com/jquery-1.12.4.min.js"></script>
    <script type="text/javascript" src="js/jquery-1.12.4.js"></script>
    <script type="text/javascript" src="js/login.js"></script>
    <link rel="stylesheet" type="text/css" href="css/login-ajax.css">
    <script type="text/javascript" src="./js/clipboard.min.js"></script>
</head>
<body>
<div style="margin-bottom: 40px;">
    <form action="/mutilfind" class="form" align="center">
        <input type="search" class="search-box" name="u_username" placeholder="输入需要搜索的内容">
        <input type="hidden" name="_method" value="searchbyab">
        <input type="submit" value="搜索" class="submit-search">
    </form>
</div>

<div class="center">
    <c:if test="${empty book}">
        <h1 align="center" style="color: white">未搜索到此书</h1>
    </c:if>
    <c:forEach items="${book}" var="b">
        <div class="search">
            <div>
                <a href="/mutilfind?b_name1=${b.b_name}&_method=bookdatil"><img src="./images/${b.b_image}" alt=""
                                                                                height="150px;"></a>
            </div>
            <div class="lastp">
                <ul>
                    <li><h3><a href="/mutilfind?b_name1=${b.b_name}&_method=bookdatil">${b.b_name}</a></h3></li>
                    <li><p>简介：<span id="jianjie">${b.b_description}</span></p></li>
                    <li><p>作者：<span id="zuozhe">${b.b_author}</span></p></li>
                    <li><p>类型：<span id="leixing"><a
                            href="/mutilfind?c_id=${b.c_id}&_method=findBookBycid">[${categorymap[b]}]</a></span></p>
                    </li>
                    <li><p>更新时间：<span id="gengxinshijian">${b.b_last_update_time}</span></p></li>
                    <li><p>最新章节：<span id="最新章节"><a
                            href="/mutilBook?ch_id1=${chid[b]}&b_name2=${b.b_name}&_method=Bookcontent">${chaptermap[b]}</a></span>
                    </p></li>
                </ul>

            </div>
        </div>
    </c:forEach>
</div>
</body>
<script src="./js/jquery-1.12.4.js"></script>
<script type="text/javascript">
    $(function () {
        $(".search-box").focus(function () {
            $(this).attr("placeholder", "");
        })
        $(".search-box").blur(function () {
            $(this).attr("placeholder", "输入需要搜索的小说");
        })
        $(".submit-search").click(function () {
            var text = $(".search-box").val();
            if (text == null || text == "") {
                alert("请输入搜索要搜索的内容，内容不能为空！");
                return false;
            }
        })
    })
</script>

</html>